#ifndef CALIBRATION_H
#define CALIBRATION_H

#include <stdint.h>

#define NUM_IMUS 32

const float C_acc[NUM_IMUS][9] = {
    {0.9998105268f, 0.0000000000f, 0.0000000000f, -0.0000035826f, 0.9985158214f, 0.0000000000f, -0.0002904876f, 0.0022096304f, 0.9980619546f},
    {0.9981083284f, 0.0000000000f, 0.0000000000f, 0.0001800292f, 0.9974234437f, 0.0000000000f, -0.0009001902f, 0.0011584873f, 0.9981947339f},
    {0.9975054943f, 0.0000000000f, 0.0000000000f, -0.0000563137f, 1.0009442092f, 0.0000000000f, 0.0010859211f, 0.0008179942f, 0.9991929861f},
    {0.9991719477f, 0.0000000000f, 0.0000000000f, -0.0000246994f, 0.9994160188f, 0.0000000000f, 0.0007906832f, -0.0001609092f, 0.9982464843f},
    {0.9980636803f, 0.0000000000f, 0.0000000000f, 0.0001295855f, 1.0001301660f, 0.0000000000f, 0.0019155502f, 0.0003164042f, 0.9983481252f},
    {0.9976162187f, 0.0000000000f, 0.0000000000f, 0.0000177357f, 0.9990026287f, 0.0000000000f, 0.0018166327f, 0.0004597575f, 0.9980286598f},
    {0.9994714723f, 0.0000000000f, 0.0000000000f, -0.0001381889f, 0.9986973051f, 0.0000000000f, 0.0028323515f, 0.0009267418f, 0.9988161198f},
    {0.9982098908f, 0.0000000000f, 0.0000000000f, 0.0002830058f, 1.0002757048f, 0.0000000000f, 0.0027801793f, 0.0005984444f, 0.9982314472f},
    {0.9994890234f, 0.0000000000f, 0.0000000000f, -0.0000775737f, 0.9980249329f, 0.0000000000f, -0.0000921875f, 0.0013651257f, 0.9975211933f},
    {0.9997212101f, 0.0000000000f, 0.0000000000f, 0.0001495894f, 0.9990459080f, 0.0000000000f, -0.0010596554f, 0.0023650192f, 0.9975543768f},
    {1.0054978596f, 0.0000000000f, 0.0000000000f, -0.0000365314f, 1.0055161152f, 0.0000000000f, -0.0019479470f, 0.0017049442f, 0.9686683464f},
    {0.9992613657f, 0.0000000000f, 0.0000000000f, -0.0000273041f, 0.9978573844f, 0.0000000000f, -0.0005662177f, 0.0018459596f, 0.9955912571f},
    {0.9972724052f, 0.0000000000f, 0.0000000000f, 0.0001028539f, 0.9979116436f, 0.0000000000f, -0.0003305646f, 0.0014363952f, 0.9974101217f},
    {0.9994778722f, 0.0000000000f, 0.0000000000f, -0.0000795278f, 0.9986567031f, 0.0000000000f, -0.0000705855f, 0.0007995434f, 0.9979588946f},
    {0.9999396417f, 0.0000000000f, 0.0000000000f, -0.0000998195f, 0.9992914788f, 0.0000000000f, -0.0004900909f, 0.0013418945f, 0.9976001524f},
    {0.9995111291f, 0.0000000000f, 0.0000000000f, 0.0001621129f, 0.9997889675f, 0.0000000000f, -0.0005005190f, 0.0013419755f, 0.9972874889f},
    {0.9996758652f, 0.0000000000f, 0.0000000000f, 0.0000575256f, 0.9984858133f, 0.0000000000f, -0.0042552840f, -0.0006718216f, 0.9994442050f},
    {0.9989129408f, 0.0000000000f, 0.0000000000f, -0.0000166115f, 1.0005317598f, 0.0000000000f, -0.0005039151f, -0.0023752564f, 0.9993557742f},
    {0.9989197645f, 0.0000000000f, 0.0000000000f, 0.0001291309f, 1.0009454256f, 0.0000000000f, -0.0011094962f, -0.0004839952f, 0.9981776325f},
    {0.9976215723f, 0.0000000000f, 0.0000000000f, 0.0001531207f, 0.9987150864f, 0.0000000000f, 0.0000890444f, 0.0000664048f, 0.9989388025f},
    {0.9991806184f, 0.0000000000f, 0.0000000000f, 0.0002282496f, 0.9987982860f, 0.0000000000f, 0.0002175288f, -0.0024087585f, 0.9982889717f},
    {0.9984482558f, 0.0000000000f, 0.0000000000f, 0.0000628503f, 0.9999284409f, 0.0000000000f, -0.0003967751f, -0.0035260634f, 0.9996207388f},
    {0.9994765076f, 0.0000000000f, 0.0000000000f, 0.0000856451f, 1.0003000241f, 0.0000000000f, -0.0012140339f, -0.0000622542f, 0.9984862748f},
    {0.9995771058f, 0.0000000000f, 0.0000000000f, 0.0000057171f, 1.0003620899f, 0.0000000000f, -0.0035165339f, -0.0019075876f, 0.9980307505f},
    {0.9986494485f, 0.0000000000f, 0.0000000000f, -0.0000425128f, 0.9986018685f, 0.0000000000f, 0.0023721440f, -0.0016272308f, 0.9985418534f},
    {0.9986584958f, 0.0000000000f, 0.0000000000f, 0.0000426453f, 0.9976152421f, 0.0000000000f, -0.0018862381f, -0.0024063773f, 0.9987146109f},
    {0.9990383063f, 0.0000000000f, 0.0000000000f, 0.0001257694f, 0.9971628730f, 0.0000000000f, 0.0003991420f, -0.0012753609f, 0.9984473318f},
    {0.9991645122f, 0.0000000000f, 0.0000000000f, 0.0004000831f, 0.9986838607f, 0.0000000000f, 0.0000825994f, 0.0005506498f, 0.9975529875f},
    {0.9994193009f, 0.0000000000f, 0.0000000000f, 0.0001091682f, 0.9987796181f, 0.0000000000f, -0.0001477925f, -0.0014574909f, 0.9977623819f},
    {0.9994427111f, 0.0000000000f, 0.0000000000f, 0.0003118691f, 0.9995247413f, 0.0000000000f, 0.0021127650f, -0.0008794602f, 0.9999929397f},
    {1.0011006575f, 0.0000000000f, 0.0000000000f, 0.0001969046f, 0.9984214289f, 0.0000000000f, 0.0007360628f, -0.0006835462f, 0.9976553605f},
    {0.9979853381f, 0.0000000000f, 0.0000000000f, 0.0001416198f, 0.9967400605f, 0.0000000000f, 0.0003000693f, -0.0030251597f, 0.9991588015f}
};

const float b_acc[NUM_IMUS][3] = {
    {-0.0277070561f, 0.0221434706f, 0.1731394084f},
    {0.0202618479f, -0.0228283359f, 0.0937969316f},
    {0.0079854938f, -0.0197808419f, 0.2219942346f},
    {-0.0040521292f, -0.0189322132f, 0.1599387746f},
    {0.0054262499f, -0.0101620199f, 0.1492235428f},
    {0.0029805998f, -0.0399751685f, 0.0982520841f},
    {0.0087915271f, -0.0034426197f, 0.1319816940f},
    {-0.0010141918f, -0.0395713731f, 0.2320636760f},
    {0.0048564548f, 0.0061516142f, 0.2850703036f},
    {-0.0045592162f, 0.0038640657f, 0.3085554295f},
    {0.1093990397f, -0.0280136587f, -1.2780880548f},
    {0.0155634320f, 0.0088523458f, 0.1963628794f},
    {-0.0104670728f, -0.0107210899f, 0.3543351822f},
    {-0.0034620909f, 0.0052529218f, 0.3831507369f},
    {0.0001518952f, 0.0062515482f, 0.2142490804f},
    {0.0237488290f, 0.0112791603f, 0.3613605958f},
    {-0.0026480316f, 0.0214190154f, 0.2448428117f},
    {-0.0182273607f, -0.0126482421f, 0.2045035347f},
    {-0.0064293512f, 0.0143461378f, 0.3539743470f},
    {-0.0084910342f, 0.0223479574f, 0.2502790084f},
    {-0.0043842738f, 0.0012193407f, 0.1733554239f},
    {-0.0125867093f, -0.0047345883f, 0.1436299351f},
    {0.0033374004f, 0.0459030315f, 0.3600815990f},
    {-0.0132384676f, 0.0308146093f, 0.1469220785f},
    {-0.0125765621f, 0.0126735826f, 0.1527534510f},
    {-0.0289093310f, 0.0126225665f, 0.0798052554f},
    {-0.0166120158f, 0.0039334617f, 0.1448567305f},
    {-0.0070644071f, 0.0109528408f, 0.1224631848f},
    {-0.0408140280f, 0.0112763621f, 0.0828394786f},
    {0.0146467976f, 0.0075894562f, 0.2732866745f},
    {-0.0208354963f, 0.0115161331f, 0.2583505303f},
    {-0.0204710768f, 0.0021230727f, 0.1176426270f}
};

const float b_gyro[NUM_IMUS][3] = {
    {-0.0035247900f, 0.0057775106f, -0.0032201506f},
    {0.0027278439f, 0.0026122892f, -0.0035676701f},
    {-0.0035945697f, 0.0051404447f, -0.0011789248f},
    {-0.0018982554f, 0.0007771012f, -0.0030421235f},
    {-0.0049845446f, 0.0059652410f, -0.0022462111f},
    {-0.0017542645f, 0.0009666926f, -0.0006121517f},
    {0.0040331250f, 0.0019096300f, -0.0050877377f},
    {0.0006503086f, 0.0015040326f, -0.0016159333f},
    {-0.0075267603f, 0.0071836406f, -0.0073537461f},
    {-0.0068787576f, 0.0037402769f, -0.0057493107f},
    {-0.0078950438f, 0.0034439489f, -0.0051782562f},
    {-0.0060723289f, 0.0038520398f, -0.0060826864f},
    {-0.0083424063f, -0.0014257649f, -0.0064649184f},
    {-0.0035157501f, 0.0041557367f, -0.0047243734f},
    {-0.0027364603f, 0.0048451229f, -0.0050949072f},
    {-0.0052447107f, 0.0019302688f, -0.0001350516f},
    {-0.0081225513f, -0.0018299141f, -0.0049100929f},
    {-0.0069732926f, -0.0020830581f, -0.0061446453f},
    {-0.0106321718f, -0.0007897275f, -0.0056499174f},
    {-0.0051483469f, -0.0011150998f, -0.0032785552f},
    {-0.0102040410f, 0.0008871003f, -0.0061926661f},
    {-0.0053973884f, -0.0019851889f, -0.0053306855f},
    {-0.0134568010f, 0.0021500875f, -0.0040663733f},
    {-0.0079377683f, -0.0005573922f, -0.0045455791f},
    {-0.0080664576f, -0.0023579308f, -0.0012524671f},
    {-0.0015956168f, 0.0012246444f, -0.0040530750f},
    {-0.0003715682f, -0.0069484340f, -0.0067835130f},
    {-0.0010145978f, -0.0035009731f, -0.0053749051f},
    {-0.0007949763f, -0.0024412169f, -0.0046362272f},
    {-0.0059816975f, -0.0033989911f, -0.0031795406f},
    {-0.0032402911f, -0.0037684096f, -0.0024057510f},
    {0.0000000000f, 0.0000000000f, 0.0000000000f}
};

#endif // CALIBRATION_H
